package cn.wolfcode.wolf2w.strategy.listener;

import cn.wolfcode.wolf2w.strategy.api.domain.Strategy;
import cn.wolfcode.wolf2w.strategy.listener.event.StrategyCRUDEvent;
import cn.wolfcode.wolf2w.strategy.service.IStrategyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextStartedEvent;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class StrategyCRUDListener implements ApplicationListener<StrategyCRUDEvent> {


    @Override
    public void onApplicationEvent(StrategyCRUDEvent event) {
        //ES 操作逻辑---事件被触发了， 会马上执行该逻辑
        Object source = event.getSource();
        int type = event.getType();
    }
}
